﻿using System;
using Artech.PetShop.Common;
using Artech.PetShop.Orders.BusinessEntity;
using Artech.PetShop.Orders.DataAccess;
using Microsoft.Practices.Unity;
namespace Artech.PetShop.Orders.BusinessComponent
{
   public class ProductBC: BusinessComponentBase
    {
       [Dependency]
       public ProductDA DataAccess
       { get; set; }

        public Product[] GetAllProducts()
        {
            return this.DataAccess.GetAllProducts();
        }

        public Product GetProductByID(Guid productID)
        {
            return this.DataAccess.GetProductByID(productID);
        }

        public int GetInventory(Guid productID)
        {
            return this.DataAccess.GetProductByID(productID).Inventory;
        }
    }
}